The present invention relates to writing of data to data storage devices, and particularly, although not exclusively, to a method for assessing the quality of data written using a data storage device to a data storage medium.
In order to store digital electronic data it is known to use magnetic tape cartridges comprising a pair of reels which are inserted into a tape drive unit having a plurality of read/write heads. Typically such magnetic tape data storage devices may be used to back up data generated by host devices, eg a computer, or to store data generated by test or measurement instruments.
Typically, conventional tape drive units operate to draw an elongate magnetic tape past a plurality of read/write heads. Tape speeds past the heads are relatively slow, of the order of a few centimeters per second. In tape based magnetic data recording systems, data may be recorded using a plurality of write heads and read with a plurality of read heads. Conventionally, these write and read heads may be either substantially stationary with respect to the rest of the device, in which case, data are stored in a plurality of tracks parallel to the elongate direction of the tape, or the write or read heads may be mounted on a drum which is rotated about an axis which is transverse to a direction of movement the tape, resulting in data which is stored in a series of tracks written side by side diagonally across the width of the magnetic tape, the diagonal tracks laying in parallel to each other along the length of the tape.
During the process of writing to the magnetic data storage media, the data can become corrupted for a number of reasons as follows:
Non-uniform coating of the tape with magnetic material;
Scratches or other damage to the magnetic coating of the data storage medium;
Dust or other particulate matter becoming temporarily trapped between a recording head and the data storage medium during the processes of reading or writing data to the data storage medium.
In conventional tape drives, it is known to incorporate electronic circuitry to encode the digital data to be stored prior to writing to tape, using an algorithm which adds error correction bits to the original digital data. The error correction bits contain information from which parts of the original data may be reconstructed if they have become corrupted during the process of writing to the data storage medium. It is known to monitor the quality of the data written to the data storage medium during the write process. If the written data has a number of corrupt bits of data that are greater than can be corrected for using the error correction bits, then the data is re-written to the data storage medium.
In order to maximise the storage capacity of a data storage medium and to minimise read and write times, for assessing the data storage medium it is important to reduce, as far as possible, the quantity of data that needs to be re-written to the data storage medium, in other words, it is important to maximise the tolerance to errors for a given degree of error correction coding of the data.
Specific embodiments and methods according to the present invention aim to improve the tolerance to errors in high data storage density tape systems, and thereby reduce the amount of data to be rewritten to tape, hence improving the storage capacity and access times of such devices.
According to one aspect of the present invention, a data stream is partitioned into a plurality of data blocks referred to herein after as fragments.
According to a first aspect of the present invention, there is provided a method of writing a stream of digital data to a data storage medium, characterized by-comprising the steps of:
partitioning said stream of digital data into a plurality of fragments;
interleaving an error correction code between individual ones of said fragments; and
partitioning a plurality of said fragments together into a plurality of groups of fragments, a grouping of said groups being determined according to said interleave.
Preferably, said plurality of fragments contain a same number of bits of data as each other.
According to a second aspect of the present invention there is provided a method for writing a stream of data to a data storage medium using a data storage device characterized by comprising the steps of:
partitioning said stream of digital data into a plurality of fragments;
writing said plurality of fragments to said data storage medium;
reading said plurality of fragments from said data storage medium (904);
checking whether each of said read fragments are correct (905);
assigning each of said correct read fragments to only one of a plurality of groups of fragments (907);
counting a total number of correct read fragments within each of said plurality of groups of fragments (909, 911, 913); and
if said total number of correct read fragments within any of said plurality of groups of fragments is less than a threshold number of correct read fragments, then repeating said step of writing said plurality of fragments to said data storage medium (915).
This method may significantly increase the tolerance to errors introduced during the process of writing data to a data storage medium.
Preferably said plurality of fragments contain a same number of bits of data.
Preferably said plurality of fragments contain bits of data for correcting errors in said fragments.
Preferably a first number of said bits of data for correcting errors in said fragments comprise a first Reed-Solomon cyclic redundancy code.
Preferably a second number of said bits of data for correcting errors in said fragments comprise a second Reed-Solomon cyclic redundancy code.
A said step of assigning each of said correct read fragments of only one of a plurality of groups of fragments, comprises the steps of:
determining a number of a correct read fragment within said plurality of fragments;
if said number of said correct read fragments is defined by a first equation, then said correct read fragment is assigned to a first group of fragments;
if said number of said correct read fragments is defined by a second equation, then said correct read fragment is assigned to a second group of fragments; and
if said number of said correct said read fragments is defined by a third equation, then said correct read fragment is assigned to a third group of fragments.
Preferably said first equation is:
fragment number=0+(Nxc3x973),
where N is an integer number and may take any value in a contiguous range of integer numbers from 0 to 31.
Preferably said second equation is:
fragment number=1+(Nxc3x973),
where N is an integer number and may take any value in a contiguous range of integer numbers 0 to 31.
Preferably said third equation is:
fragment number=2+(Nxc3x973),
where N is an integer number and may take any value in a contiguous range of integer numbers from 0 to 31.
Said data storage medium may comprise a magnetic tape or a magnetic disk. In the best mode described, the method is applied to a magnetic tape.
According to a second aspect of the present invention there is provided a data storage device for writing a stream of data to a data storage medium characterised by comprising:
a means for partitioning said stream of data into a plurality of fragments (810);
a means for writing said plurality of fragments to said data storage medium (810, 102, 201, 203);
a means for reading said plurality of fragments from said data storage medium (102, 202, 204);
a means for identifying correct fragments (801);
a means for identifying a position of said correct read fragments within said plurality of fragments (803);
a means for assigning said correct read fragments to only one group of a plurality of groups of fragments;
a plurality of means for counting a number of said correct read fragments (804-806); and
a means (810, 102, 201, 203) for causing said plurality of fragments to be re-written to said data storage medium if said number of said correct read fragments within any of said plurality of groups of fragments is less than a threshold number of correct read fragments.
Preferably said means for causing said plurality of fragments to be rewritten to said data storage medium comprises a microprocessor.
Preferably said data storage medium is a magnetic tape. Said data storage medium may be a magnetic disk.